package com.itWaiLong.Controller.group;

import com.itWaiLong.Dao.project_share;
import com.itWaiLong.Result.Result;
import com.itWaiLong.Service.ShareProjectService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/groupShare")
public class shareGroupProjectController {

    @Autowired
    private ShareProjectService shareProjectService;

    /**
     * 分享团队的项目
     * @param projectShare
     * @return
     */
    @PostMapping("/share")
    public Result shareGroupProject(@RequestBody project_share projectShare){
        log.info("分享的项目的信息：{}",projectShare);
        shareProjectService.groupShare(projectShare);
        return Result.success();
    }
}
